from django.urls import path, include, re_path
from rest_framework.routers import DefaultRouter

from gesture_demo_server import views

router = DefaultRouter()
router.register(r"course", views.CourseApi)
router.register(r"courseType", views.CourseTypeApi)
# router.register(r"course/<pk>", views.CourseApi)

urlpatterns = [
    # path("", views.handle_action, name='')
    path('user/<action>', views.UserApi.as_view(), name='user'),
    re_path(r"^", include(router.urls)),
    # path('course/', views.CourseApi.as_view({'get': 'get'}), name='course'),
    # path('course/', views.CourseApi.as_view({'get': 'get'}), name='course'),
    path('courseVideo/', views.CourseVideoApi.as_view(), name='course_video'),
]
